<!-- 
	This is the game page
-->
	
<!--status bar used while debugging javascript-->

<div id=status></div>

<div id=gameadmin>
<?php 
//echo "haha";
if (isUserCreatorOfGame($user,$game)){
	$gameid = $game['gameid'];
	echo "<form action='$game_trydeletegame&gameid=$gameid&delgameid=$gameid' method=post>";
	echo "<input type=submit value='Delete game'></form>";
}
?>
</div>
<div>
	<div id=sudokutablewrap>
		<div id=hintmoveswrap></div>
			<div id=inputwrap><input id=input type=text maxlength=1></div>
			<?php 
			//print the sudoku div tags without formattings
			printSudokuCells();
			?>
		</div>
	</div>
	
	<div id=sidebarwrap>
		<div id=roominfo>
			<div id=roominfotext>
				<h3>You are in <?php echo $game['gamename']?></h3>
				<p><span class=graytext>Description: </span><?php echo $game['description']?></p>
				<p><span class=graytext>Difficulty: </span><?php echo $difficulty[$game['difficulty']];?></p>
			</div>
		</div>
		<div id=roominfo>
			<div id=roominfotext>
				<h3>In this room are...</h3>
				<div id=playerlist><!--player list ajax injection--></div>
				<?php printChat("chat"); ?>
			</div>
		</div>
		<div id=hidden-area></div>
	</div>
	
	
<script src="<?php echo $rootDir; ?>/static/javascript/game.js" type="text/javascript"></script>
<?php 
	//initialize the game
	printSudokuInitializeScript($user,$game);
	
	//initialize chat session
	printChatInitializeScript("chat",$game['chatlogid'],urlencode($user['nickname'])); 
	
?>